<template>
  <el-menu
    background-color="#545c64"
    text-color="#fff"
    active-text-color="#ffd04b"
  >
    <el-submenu :index="index" v-for="(menu,index) in datas" :key="index" v-if="menu.submenu != null">
      <template slot="title">
        <i v-if="menu.ico " :class="menu.ico"></i>
        <span slot="title">{{menu.label}}</span>
      </template>
    </el-submenu>
    <el-menu-item :index="index" v-for="(menu,index) in datas" :key="index" v-if="menu.submenu == null">
      <i v-if="menu.ico " :class="menu.ico"></i>
      <span slot="title">{{menu.label}}</span>
    </el-menu-item>

  </el-menu>
</template>

<script>
  export default {
    name: "DataMenu",
    data() {
      return {
        datas: [
          {
            label: "账号管理",
            ico: 'el-icon-setting',
            submenu: [
              {
                label: "主账号信息",
              },
              {
                label: "员工管理",
              },
              {
                label: "账户推广",
              }
            ]
          },

          {
            label: "VD管理",
            ico: 'el-icon-menu'
          },
          {
            label: "操作日志",
            ico: 'el-icon-tickets',
          },
          {
            label: "充值消费管理",
            ico: 'el-icon-goods'
          }
        ]
      }
    }
  }
</script>

<style scoped>

</style>
